home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_bab_radio_chatter.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
100 lines
# Jones 3D Cog Script
#
# gen_radio_chatter.cog
#
# Generic Door Script
#
# [CMG]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
#..................MESSAGES................
message startup
message crossed
message pulse
#..................PROPS................
thing soundobj
#..................ACTORS................
thing player local
#..................TRIGGERS................
surface endsurf0 linkID=3
surface startsurf linkID=2
#..................VARIABLES................
int inrange=0 local
int vol=1 local
int snd local
int chattertime local # int for holding Rand value
int i local # int for for loops
#..................SOUND................
sound chatter0=riv_radio_chatter_a1.wav local
sound chatter1=riv_radio_chatter_a2.wav local
sound chatter2=riv_radio_chatter_a3.wav local
sound chatter3=riv_radio_chatter_a4.wav local
sound chatter4=riv_radio_chatter_a5.wav local
end
# ========================================================================================
code
# ........................................................................................
startup:
player = GetLocalPlayerThing();
Sleep(5);
chattertime=RandBetween(6, 12);
SetPulse(chattertime);
return;
# ........................................................................................
crossed:
if (GetSourceRef() != player) return;
if (GetSenderID() == 2) # start the sounds
{
If (inrange != 0)
{
inrange = 0;
}
chattertime=RandBetween(6, 12);
SetPulse(chattertime);
}
if (GetSenderID() == 3) # stop the sounds
{
If (inrange != 0)
{
inrange = 0;
}
SetPulse(0);
//print("radio timer cut");
}
return;
# ........................................................................................
pulse:
//print("pulse hit");
i=RandBetween(0,4); # choose a sound
PlaySoundThing(chatter0[i], soundobj, vol, 5, 10, 0x0);
return;
# ........................................................................................
end